<include file="public@header"/>
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInUp">
    <div class="row">
        <div class="col-md-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>编辑管理员</h5>
                    <div class="ibox-tools">
                        <a href="{:url('user/index')}" class="btn btn-primary btn-xs">{:lang('ADMIN_USER_INDEX')}</a>
                        <a href="{:url('user/add')}" class="btn btn-primary btn-xs">{:lang('ADMIN_USER_ADD')}</a>
                        <a href="#" class="btn btn-primary btn-xs active">编辑管理员</a>
                    </div>
                </div>
                <div class="ibox-content">
                    <form action="{:url('User/editPost')}" method="post" class="form-horizontal js-ajax-form margin-top-20">
                        <div class="row">
                            <div class="col-md-12">
                                <div class="form-group">
                                    <label class="col-sm-2 control-label"><span class="form-required">*</span>{:lang('USERNAME')}</label>
                                    <div class="col-md-8">
                                        <input type="text" class="form-control" required id="input-user_login" name="user_login" value="{$user_login}">
                                    </div>
                                </div>
                                <div class="hr-line-dashed">
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label"><span class="form-required">*</span>{:lang('PASSWORD')}</label>
                                    <div class="col-md-8">
                                        <input type="password" class="form-control" id="input-user_pass" name="user_pass" placeholder="******" value="">
                                    </div>
                                </div>
                                <div class="hr-line-dashed">
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label"><span class="form-required">*</span>{:lang('EMAIL')}</label>
                                    <div class="col-md-8">
                                        <input type="text" class="form-control" required id="input-user_email" name="user_email" value="{$user_email}">
                                    </div>
                                </div>
                                <div class="hr-line-dashed">
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label"><span class="form-required">*</span>{:lang('ROLE')}</label>
                                    <div class="col-md-8">
                                        <foreach name="roles" item="vo">
                                        <label class="checkbox-inline">
                                            <php>$role_id_checked=in_array($vo['id'],$role_ids)?"checked":"";</php>
                                            <input value="{$vo.id}" type="checkbox" name="role_id[]" {$role_id_checked} <if condition="cmf_get_current_admin_id() neq 1 && $vo['id'] eq 1">disabled="true"</if>>{$vo.name}
                                        </label>
                                    </foreach>
                                    </div>
                                </div>
                                <div class="hr-line-dashed">
                                </div>
                                <div class="form-group">
                                    <div class="col-sm-offset-2 col-md-8">
                                        <input type="hidden" name="id" value="{$id}" />
                                        <button type="submit" class="btn btn-primary js-ajax-submit">{:lang("SAVE")}</button>
                                        <a class="btn btn-default" href="javascript:history.back(-1);">{:lang('BACK')}</a>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
    <script src="__STATIC__/js/admin.js"></script>
    </body>
    </html>